package com.wu.apiorder.mapper;

import com.wu.common.entity.Order;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;
import java.util.List;

/**
 * @author whx
 * @date 2021/7/19
 */
@Mapper
public interface OrderMapper {

    @Select("select * from `order`")
    @Results({
            @Result(property = "createTime",column = "create_time",javaType = Date.class,jdbcType = JdbcType.TIMESTAMP)
    })
    List<Order> findAll();

    @Update("update `order` set order_no='111' where id = #{0}")
    void update(int id);

}
